The Linux character encoding defaults to UTF-8, which can be set to GBK if garbled1. Manually change the profile command:VI /etc/profileYou can also modify the/etc/sysconfig/i18n file, such aslang="en_US. UTF-8"LANG="zh_cn.gb18030 "There is another
Document directory
ASCII
GB2312
GBK
UTF Encoding
Setlocale
Miserable programmer
ASCII
Table language English and Western European language.
ASCII is represented by 7 characters, which can represent 128 characters. Its Extension uses 8
First check securecrt,
Set
Options-> Global Options-> General-> default session-> edit default settings-> terminal->
Appearance-> character encoding,
Select the UTF-8.
Then set
Options-> Global Options-> General-> default session-> edit default
Export lang= "zh_cn.gb118030"In general, it is necessary to set the environment variables of the Linux system only in/etc/profile (global) or ~/.BASHRC (single user). But for the lang variable, sometimes even if you export in all of these
The "preface" is explained in the blog post:This article will introduce the Linux character set and system language settings through a personal tone, including lang,locale,lc_all,posix commands and the relevant knowledge of the parameters, at the
Add encoding support
sudo locale-gen zh_CN.GBKsudo locale-gen zh_CN.GB2312sudo locale-gen zh_CN.GB18030
2. Update locale:
sudo dpkg-reconfigure locales
Sudo locale-genIfZh_cn.gb18030... Done
Prompts such as indicate that the internal code has been
Method 1:Use Linux iconv to convert the Utf-8 log to GBK encoded file, and then gbk the statistics in the environment. UTF8 () { log_file= "/lcims/crontab_shell/outfile/lan_wlan_wo/socketmain.log141114_lan1" LOG_FILE_TMP= "/
Technote (troubleshooting) problem (Abstract)During Insert from the CLP there was no codepage conversion if operating system codepage and database codepage are both UTF -8. In the case data to is inserted should also is in UTF-8 encoding.If data has
First into the Linux program staff, often get garbled greetings. "Toss". Because of garbled, and finally gave up Linux is not a minority. Well, to get to the point, here's a look at the specific Linux garbled solution.
method One: modify/root/.bash_
The problem that java programs write Chinese Characters in linux always becomes UTF-8-general Linux technology-Linux programming and kernel information. For more information, see the following. In linux:
Title = (new String (title. getBytes ("ISO8
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.